System and method to protect data stored in a storage system

ABSTRACT

Systems and methods are provided for generating a snapshot that records desired data, while allowing a client server to continue sending data to the storage system. In an example of an embodiment of the invention, a method is provided for recording data generated by a client server and transmitted to a storage system. The method comprises storing data, received from the client server, in the storage system, and receiving a command from the client server to perform a snapshot of the data. The method further comprises generating a snapshot of the data stored in the storage system in response to the command.

The present application is a division of U.S. application Ser. No.10/612,081, which was filed on Jul. 2, 2003 U.S. Pat. No. 7,165,145,which issued on Jan. 16, 2007, is assigned to the assignee of thepresent application, and is incorporated by reference herein in itsentirety.

FIELD OF THE INVENTION

The invention relates generally to a system and method for storing data,and more particularly, to a method and system for performing snapshotsof data stored in a storage system.

BACKGROUND OF THE INVENTION

Generating a snapshot of data is a method commonly used to preserve andprotect data stored in a storage system. A snapshot is a record of datastored in a storage system at a selected moment in time. A snapshot maybe used, for example, to recover an earlier version of the data in theevent a current version becomes corrupted, or may be copied to anotherstorage device to provide a backup copy of the data.

In many storage systems, performing a snapshot is a relatively simpleoperation. However, if a cache is used in the storage system, performingthe snapshot often becomes more challenging. Typically, a cachefunctions as a buffer, i.e., data sent by the client server to disk isrecorded first in the cache, and subsequently is flushed to the disk. Acache is typically constructed of a type of memory that can be accessedmore rapidly than the primary storage devices in the system.Accordingly, a storage system can increase its efficiency by temporarilystoring in the cache selected items of data that are likely to berequested by a client. Many storage systems, operating on the principlethat data recently sent to disk have a high probability of beingaccessed again, uniformly transmit data to a cache before sending it todisk. As used herein, the term “disk” has the same meaning as “storagedevice;” accordingly, “stored on disk” means stored on a storage device,“sent to disk” means sent to a storage device, etc. “Client” and “clientserver” are used herein interchangeably.

In many storage systems, a cache processes data sequentially to preservedata integrity. Changes made by a client server to a data file, forexample, are recorded in the cache in the order they were performed andflushed to disk in the same order. Where a cache receives data frommultiple clients, the cache typically processes data from a given clientsequentially; however, the cache may assign a higher priority to datareceived from one client over data received from other clients. In sucha case, the cache may not adhere to a strict first-in-first-out mode ofoperation.

To preserve data integrity, a snapshot must capture and preserve alldata sent to disk by the client server up to the precise moment thesnapshot is requested. However, where a cache is used, some data sent todisk by a client before the snapshot request may remain in the cache,not yet having been flushed to disk, at the moment the snapshot requestis made. In such case, performing a snapshot of data stored on disk atthe moment the request is made would produce an inaccurate recordbecause it would not capture the data remaining in the cache at thatmoment. To produce an accurate snapshot, it is necessary to incorporatethe data from the cache into the snapshot.

One solution to this problem requires first directing the client serverto suspend transmission of data to the storage system. All data in thecache is then flushed to disk, and finally the snapshot is performed.This method may be adequate if very little data is present in the cacheat the moment the snapshot is requested. Otherwise, this method is oftenundesirable because the client server is required to wait for the dataflush to finish before it can resume normal operations. This canrepresent a substantial inconvenience to the client server andcompromise the efficiency of the data storage provider.

It is often useful to generate a snapshot of data before performing adata processing task that poses a risk of corrupting data in a storagesystem. For example, in many systems simply maintaining a backup copy ofa primary disk can occasionally pose substantial risks. If, for example,the system employs asynchronous mirroring, i.e., a cache is used totemporarily store data written to the primary disk before writing to themirroring disk, an interruption in the communication between the cacheand the mirroring disk can cause data to be lost and the backup copy tobecome corrupted. Generally, in such case it is necessary to synchronizethe mirroring disk with the primary disk, i.e., simply copy datasector-by-sector from the primary disk to the mirroring disk. However,if the primary disk becomes corrupted before the copying procedure iscompleted, then there may be no uncorrupted version of the primary diskleft. Moreover, in such case, the data on the mirroring disk is oftencorrupted by an incomplete copy procedure. It is therefore oftenpreferable to generate a snapshot of the mirroring disk immediatelybefore attempting to synchronize the mirroring disk with the main disk.

Many existing storage systems fail to determine a suitable moment fortaking a snapshot. This is partly due to the fact that, in manynetworks, a client server (such as a data server) manages the dataprocessing and storage functions, and storage systems merely processrequests received from the client server. Therefore, the client server,rather than the storage system, determines an appropriate time for asnapshot. However, in prior art systems, the client server does not havethe capability to direct the storage system to perform a snapshot at aselected moment. Instead, many storage systems are configured simply toperform snapshots at predetermined intervals, e.g., every 30 minutes.

SUMMARY OF THE INVENTION

Accordingly, there is a need for a method and system for performingsnapshot copies of data stored in a data storage system in a manner thatcaptures data transmitted to disk by a client server prior to thesnapshot request without requiring the client server to cease sendingdata to the storage system. There is additionally a need for a systemthat enables a client server to direct a storage system on a network toperform a snapshot.

Embodiments of the present systems and methods provide for generating asnapshot that records desired data, while allowing a client server tocontinue sending data to the storage system. In accordance with oneembodiment of the invention, a method is provided for recording datagenerated by a client server and transmitted to a storage system. Themethod comprises storing data received from the client server, in thestorage system, and receiving a command from the client server toperform a snapshot of the data. The method further comprises generatinga snapshot of the data stored in the storage system in response to thecommand.

In one example, the command is transmitted in accordance with SCSIprotocols. The command may comprise instructions contained in a SCSIcommand descriptor block. The client server may communicate with thestorage system over a network, for example. The network may comprise awide area network (WAN), a local area network (LAN), aFibre-Channel-based storage area network (SAN), an internet, anintranet, etc.

The command may be received periodically or aperiodically, for example.The command may be received prior to and in association with a dataprocessing operation, which may comprise synchronizing two storagesystems, for example.

In accordance with another embodiment of the invention, a method isprovided for recording data generated by a client server and transmittedto a storage system. The method comprises transmitting data to a storagesystem for storage, and generating a command to perform a snapshot ofthe data stored by the storage system. The method further comprisestransmitting the command to the storage system to perform a snapshot ofthe data.

In accordance with another embodiment of the invention, a system isprovided for recording data generated by a client server and transmittedto a storage system. The system comprises a memory configured to storedata, received from the client server, in the storage system. The systemalso comprises a controller configured to receive a command from theclient server to perform a snapshot of the data, and to generate asnapshot of the data stored in the storage system in response to thecommand.

In accordance with another embodiment of the invention, a system isprovided for recording data stored in a storage system. The systemcomprises a client server configured to generate data, transmit the datato a storage system for storage, generate a command to perform asnapshot of the data stored by the storage system, and transmit thecommand to the storage system to perform a snapshot of the data. Thesystem also comprises a storage system configured to receive the datafrom the client server, receive the command from the client server, andto perform the snapshot of the data in response to the command.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other features and advantages of the invention will beapparent to those skilled in the art from the following detaileddescription of preferred embodiments, taken together with theaccompanying drawings, in which:

FIG. 1 illustrates a network for generating snapshots in accordance withone implementation of the invention;

FIG. 2 illustrates components of a storage system in accordance with oneimplementation of the invention;

FIG. 3A illustrates the contents of a segment descriptor in accordancewith one implementation of the invention;

FIG. 3B illustrates a free segment list, a segment descriptor, and asegment map used to manage data in accordance with a dynamic disk spaceallocation technique;

FIGS. 4A-4C show the contents of a cache at various points during theprocess of performing a snapshot in accordance with a prior arttechnique;

FIG. 5 is a flowchart describing a method for performing a snapshot inaccordance with one implementation of the invention;

FIGS. 6A-6D show the contents of a cache at various points during theprocess of performing a snapshot in accordance with an aspect of theinvention;

FIG. 7 is a block diagram showing the relationship of SCSI bus phases;

FIG. 8 shows a system for generating a SCSI command; and

FIG. 9 is a flowchart showing a method for transmitting a commandrepresenting a snapshot request in accordance with one implementation ofthe invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 illustrates a network for generating snapshots in accordance withan aspect of the invention. Client servers 140-1, 140-2 and 140-3 areconnected over network 150 to storage system 210. Each of client servers140-1, 140-2 and 140-3 may be any device or software application thataccesses data from storage system 210. In one implementation, clientservers 140 are server systems that provide software applications andservices for users. In one implementation, each client server is asoftware application executing on a distinct machine, e.g., a computer.For example, according to this implementation, client server 140-1 is afile server application running on a workstation, client server 140-2 isan email server application running on a desktop PC, etc. In analternative implementation, client servers 140-1, 140-2 and 140-3 allreside and execute on a single computer. It should be noted that,although for purposes of illustration, a file server, an email serverand a remote access server are shown in FIG. 1, client servers 140-1,140-2 and 140-3 may be implemented as server applications of any type.It should also be noted that, although for purposes of illustration,three client servers are shown, any number of client servers may beincluded.

Network 150 may be implemented as any one of a number of different typesof networks. In accordance with one implementation, communications areconducted over network 150 by means of IP protocols. In accordance withanother implementation, communications are conducted over network 150 bymeans of Fibre Channel protocols. Thus, network 150 may be, for example,an intranet, a local area network (LAN), a wide area network (WAN), aninternet, Fibre Channel storage area network (SAN) or Ethernet.Alternatively, network 150 may be implemented as a combination ofdifferent types of networks.

FIG. 2 illustrates components of storage system 210 used for storingdata in accordance with an aspect of the invention. Storage system 210includes interface 218, storage system manager 220 and storage devices250-1, 250-2 and 250-3. It should be noted that although three storagedevices are shown in FIG. 2, storage system 210 may include any numberof storage devices.

Interface 218 provides a communication gateway through which data may betransmitted between storage system 210 and network 150. Interface 218may be implemented using a number of different mechanisms, such as oneor more SCSI cards, enterprise systems connection cards, fiber channelinterfaces, modems, network interfaces, or a network hub.

Storage system manager 220 comprises a controller 320, memory 324 andcache 340. Controller 320 orchestrates the operations of storage systemmanager 220, including receiving and processing data processing requestsfrom network 150, and sending data processing commands to storagedevices 250-1, 250-2 and 250-3. Controller 320 receives from network 150data processing requests formatted according to IP or Fibre Channelprotocols.

Communications between controller 320 and storage devices 250 areconducted in accordance with SCSI protocols. Accordingly, controller 320transmits data processing commands to, and receives data from, storagedevices 250, in accordance with SCSI protocols. In one implementation,controller 320 is implemented by a software application. In analternative implementation, controller 320 is implemented by acombination of software and digital or analog circuitry.

Memory 324 is used by controller 320 to manage the flow of data to andfrom, and the location of data on, storage devices 250. For example,controller 320 may store in memory 324 various tables indicating thelocations and types of various items of data stored in storage devices250.

Cache 340 functions as a buffer between controller 320 and storagedevices 250. Data assigned to an address on a storage device is firstwritten in cache 340, and subsequently flushed to disk. In oneimplementation, data written in cache is managed on a first-in-first-outbasis, to ensure that changes made to a given data file are recorded inthe correct order. Accordingly, data is written sequentially to cache340 and, similarly, data is flushed from cache 340 to disk in sequentialorder. In alternative implementations, cache 340 does not maintain astrict first-in-first-out mode of operation, but instead processes dataaccording to priorities established by controller 320. For example, inone such implementation, cache 340 receives data from more than oneclient, but assigns a higher priority to data received from a specifiedclient than to data received from other clients. Nevertheless, in thisimplementation, cache 340 maintains a first-in-first out mode ofoperation with respect to data received from any given client. Cache 340may store data either in volatile or by non-volatile memory.

Each of storage devices 250 may be any type of storage device thatallows block-level storage access. In one implementation, storagedevices 250 are disk drives. A disk drive includes one or more diskshaving a medium upon which information may be written. Each diskincludes a number of physical tracks, each of which, in turn, is dividedinto one or more physical blocks. Accordingly, in this implementation,an address identifying the location of a data block on a disk drive mayspecify a disk, a physical track and a physical block. Storage devices250-1, 250-2 and 250-3 are connected to storage system manager 220, inaccordance with this implementation, by Fibre Channel interfaces, SCSIconnections, or a combination thereof.

One implementation by which storage system manager 220 allocates diskspace for storing data is described below as an example. It should benoted, however, that this implementation is for illustrative purposesonly and that other techniques for allocating disk space may be used.

Storage system manager 220 may dynamically allocate disk space accordingto a technique that assigns disk space to a virtual disk drive asneeded. The dynamic allocation technique functions on a drive level. Insuch instances, disk drives that are managed by storage system manager220 are defined as virtual drives. The virtual drive system allows analgorithm to manage a “virtual” disk drive having assigned to it anamount of virtual storage that is larger than the amount of availablephysical storage. Accordingly, large disk drives can virtually exist ona system without requiring an initial investment of an entire storagesubsystem. Additional storage may then be added as it is requiredwithout committing these resources prematurely. Alternatively, a virtualdisk drive may have assigned to it an amount of virtual storage that issmaller than the amount of available physical storage.

According to this implementation, when storage system manager 220initially defines a virtual storage device, or when additional storageis assigned to the virtual storage device, the disk space on the storagedevices is divided into segments. Each segment has associated with itsegment descriptors, which are stored in a free list table in memory.Generally, a segment descriptor contains information defining thesegment it represents; for example, the segment descriptor may define ahome storage device location, physical starting sector of the segment,sector count within the segment, and segment number. FIG. 3A illustratesschematically the contents of a segment descriptor 32. Fields 32-1through 32-5 contain data indicating, respectively, on which storagedevice the segment is located, the segment's starting physical address,the segment's size, a segment identifier, and other information whichmay be useful for identifying and processing the segment.

Referring to FIG. 3B, as segments are needed to store data, the nextavailable segment descriptor, e.g., segment descriptor 32, is identifiedfrom the free segment list 50, the data is stored in the segment, andthe segment descriptor 32 is assigned to a new table called a segmentmap 66. The segment map 66 maintains information representing how eachsegment defines the virtual storage device. More specifically, thesegment map provides the logical sector to physical sector mapping of avirtual storage device. After the free segment descriptor 32 is moved orstored in the appropriate area of the segment map 66, which in thisexample is slot 2 (70), the descriptor is no longer a free segment butis now an allocated segment. A detailed description of this method fordynamically allocating disk space can be found in U.S. Pat. No.7,058,788, dated Jun. 6, 2006, which is incorporated herein by referencein its entirety.

To preserve the contents of selected data files at a selected moment intime, storage systems commonly generate snapshots of the selected data.If a cache is used, some data sent to disk by a client immediatelybefore the snapshot request may remain in the cache, not yet having beenflushed to disk, at the moment the snapshot request is made. All suchdata must be incorporated into the snapshot in order to produce anaccurate record.

One technique for performing snapshots that is known in the art entailsfirst directing the client server to suspend transmissions of data todisk. Data in the cache is then flushed to disk, and then the snapshotis performed. This prior art method is illustrated with reference toFIGS. 4A-4C. In this example, all data items inserted in cache 340originate from a single client server, e.g., file server 140-1. FIG. 4Aillustrates the contents of cache 340 at the moment controller 320determines that a snapshot of data in one or more storage devices isrequested. At that moment, cache 340 contains a queue made up of dataitems 530-534. It should be noted that the direction arrow 325represents data transmitted to cache 340 for entry into the queue. Thedirection arrow 245 represents data flushed from cache 340. Referring toFIG. 4A, data item 530 is the last data item in the queue, indicatingthat it was the last data item transmitted to cache 340. Aftercontroller 320 determines that a snapshot has been requested, controller320 stops transmitting data to cache 340 and waits until cache 340flushes all of its contents to storage devices 250. If the snapshotrequest was received from a client server, e.g., file server 140-1,controller 320 directs the file server to temporarily cease transmittingdata to disk. FIG. 4B illustrates schematically the contents of cache340 after data items 531-534 have been flushed to disk, but before dataitem 530 has been flushed to disk. FIG. 4C illustrates schematically thecontents of cache 340 after data item 530 has been flushed to disk.Cache 340 is now empty. At this point, controller 320 detects that cache340 is empty and performs the snapshot. Controller 320 notifies fileserver 140-1 that it may continue transmitting data to disk.

It should be noted that FIGS. 4A-4C are figurative illustrations. Thedata items shown in FIGS. 4A-4C are presented as if they are moving fromleft to right to illustrate their position in the queue. However, insidea cache in a computer, there is no physical moment of data; instead,transfers of data are accomplished by electrical signals. It shouldfurther be noted that although in the example illustrated by FIGS. 4A-4Ccache 340 receives data from only one client server, in many storagesystems a cache receives data from multiple client servers.

This method of performing snapshots, as described with reference toFIGS. 4A-4C, may impose considerable inconveniences on the client serveras well as on the storage provider. For example, the client server isrequired to wait for the data flush to finish before it can resumenormal operations. Such inconveniences may be overcome by generating asnapshot of data in response to a snapshot request, while ensuring thatthe snapshot incorporates all data sent to disk prior to the time thesnapshot request is made. In addition, such inconveniences may beovercome by eliminating the need to suspend the transmission of databetween the client server and storage system while a snapshot operationis being performed.

In accordance with one aspect of the invention, upon determining that asnapshot has been requested, controller 320 of storage system manager220 inserts a snapshot marker into cache 340. While the snapshot markerremains in cache 340, storage system manager continues to flush datafrom cache 340 to disk. Once the snapshot marker is flushed to disk, thesnapshot is performed.

FIG. 5 is a flowchart describing a method for performing a snapshot, inaccordance with this aspect of the invention. In addition, this methodis illustrated with reference to FIGS. 6A-6D. At step 508, controller320 determines that a snapshot should be made. Any one of severaldifferent types of events may prompt this determination. For example,controller 320 may receive a snapshot request from a client server,e.g., file server 140-1. Alternatively, controller 320 may determinethat the normal operation of the storage system dictates that a snapshotshould be made, e.g., controller 220 may be programmed to periodicallytake snapshots of selected blocks of data stored in storage devices250-1, 250-2 and 250-3.

At step 510, controller 320 generates a snapshot marker. The snapshotmarker is information that identifies the last item of data that is tobe sent to disk before the snapshot is performed. According to oneimplementation, the snapshot marker comprises a data pattern that isstatistically unlikely to occur in transmissions that are received bystorage system 210. For example, a snapshot marker may be implemented bythe data string:

“$$$$SNAPSHOTMARKER****.”

At step 520, controller 320 inserts the snapshot marker into cache 340.Because data is written sequentially to cache 340, the snapshot markeris inserted at the end of a queue maintained in cache 340. The otherdata items in the queue, if any, were written to cache 340 before thesnapshot marker was inserted. Because these data items were sent to diskbefore the snapshot request was made, it is necessary to incorporatethem into the snapshot in order to produce an accurate record. FIG. 6Ashows the contents of cache 340 at the moment snapshot marker 615 isinserted. Cache contains data items 1-5 and snapshot marker 615. Dataitems 1-5 represent data inserted into cache 340 before snapshot marker615 was inserted. Accordingly, data items 1-5 represent data sent todisk before the snapshot request was made.

It should be noted at this point that in the implementation illustratedby FIGS. 6A-6D, cache 340 operates on a first-in-first-out basis, i.e.,all data sent to disk are sent first to cache and subsequently flushedto disk in the same order. However, other implementations may notoperate in this manner. For example, a storage system that receives datafrom two different data servers may cache all data that is received, butassign a higher priority to data received from one of the servers.Accordingly, the system may first flush to disk any data from thehigh-priority data server that is present in the cache before flushingdata from the other data server.

It should be further noted that the frequency with which data is flushedfrom cache 340 may differ depending on the particular implementation,and is typically not affected by the insertion into cache 340 of asnapshot marker. In one implementation, data is flushed to diskperiodically at predetermined intervals.

At step 530, controller 320 flushes data from cache 340. FIG. 6Billustrates schematically the contents of cache 340 after data items 1-3have been flushed to disk. At this point, cache 340 contains data items4-5, snapshot marker 615 and data items 6-8. Data items 6-8 representdata items that were inserted into cache 340 after the snapshot requestwas made.

While the snapshot marker 615 remains in cache 340, controller 320continues to flush data from cache 340 to disk. Referring to FIG. 6B,snapshot marker 615 remains in cache 340. Accordingly, controller 320continues to flush data to disk. FIG. 6C shows the contents of cache 340after data items 4-5 have been flushed to disk. The cache now containssnapshot marker 615 and data items 6-10, i.e., items that were added tocache after the snapshot request was made.

Because snapshot marker 615 continues to remain in cache 340, controller320 continues to flush data to disk. At step 535, snapshot marker isflushed from cache to disk. FIG. 6D illustrates schematically thecontents of cache 340 at the moment snapshot marker 615 has been flushedto disk. In this example, cache 340 contains data items 6-11. At thispoint, snapshot marker 615 is no longer in cache 340. Accordingly(referring to step 540), controller 320 immediately performs therequested snapshot.

SCSI Command

According to another aspect of the invention, a client server transmitsa command representing a snapshot request to a storage system. Thecommand is transmitted in accordance with standard protocols. Thestorage system receives the command and, in response, performs asnapshot.

It is often useful to generate a snapshot of data before performing adata processing task that poses a risk of corrupting data in a storagesystem. For example, in an asynchronous mirroring arrangement, it isoften preferable to generate a snapshot of the mirroring disk beforeattempting to synchronize the mirroring disk with the main disk. In sucha case, it is useful to automatically generate a snapshot immediatelybefore the synchronization process begins.

According to one implementation, a client server, e.g., file server140-1, transmits to storage system 210 a SCSI command that represents asnapshot request. The Small Computer System Interface (SCSI) is astandard for connecting computers to peripheral devices such as diskdrives. The SCSI standard specifies the hardware and software interfacebetween these devices at a level that minimizes dependencies on anyspecific hardware implementation. This is achieved by representing datastored on a storage device as a collection of logical blocks rather thanin terms of the data's physical address. This abstraction allows theSCSI protocol to be used with a wide variety of devices.

The central item of hardware in a SCSI system is the SCSI bus, whichmust conform to the specification of the SCSI standard. A SCSI devicerefers to any device that is connected to the SCSI bus. Each SCSI deviceon the bus is assigned a SCSI ID that uniquely identifies the deviceduring SCSI transactions.

The SCSI standard also establishes a set of protocols by which SCSIdevices may communicate, or transact. When two SCSI devices communicate,one device acts as the initiator and the other as the target. Theinitiator begins a transaction by selecting a target device. The targetresponds to the selection and requests a command. The initiator thensends a SCSI command directing the target to perform a specified action,and the target performs the action.

SCSI transactions comprise up to eight distinct phases: bus free,arbitration, selection, reselection, command, data, status and message.FIG. 7 is a block diagram showing the relationship of the SCSI busphases. The bus free phase 815 indicates that no SCSI devices are usingthe SCSI bus. During arbitration phase 820, a SCSI device may gaincontrol of the SCSI bus. All devices requesting to use the bus asserttheir SCSI ID by transmitting a signal onto the bus. The device havingthe highest ID wins the arbitration and becomes the initiator for thenext SCSI transaction. During selection phase 825, the initiator selectsa target device. The optional reselection phase (not shown) allows aperipheral that is busy performing a lengthy data processing action todisconnect from and subsequently reconnect to the SCSI bus.

The last four phases (command, data, status and message) are referred tocollectively as the information transfer phases, and are represented inFIG. 7 by block 840. During these phases, data can be transferredbetween the initiator and target devices. During the command phase, atarget device requests a command from the initiator, and in response,the initiator transfers a SCSI command to the target. A SCSI command isan instruction from an initiator to a target to perform an action, suchas reading or writing a block of data. SCSI commands are contained in adata structure called a command descriptor block, which can be 6, 10 or12 bytes in size. The first byte specifies the action requested, and theremaining bytes are parameters used for that action. The target candetermine from the first command byte transmitted how many command byteswill follow.

During the data phase, data is transferred between the initiator and thetarget. To indicate that it is ready to transmit data to the initiator,the target transmits an input/output (I/O) signal indicating DATA IN. Toindicate that it is ready to receive data, the target transmits a DATAOUT signal.

During the message phase, the target requests the transfer of a message.The SCSI standard specifies a number of possible messages that may beexchanged between SCSI devices. SCSI messages must conform to thestructure specified by the SCSI standard and generally carry informationabout a SCSI transaction. The status phase occurs after completion ofall commands and allows the target to transmit a status signal to theinitiator. For example, the target may send status informationindicating that an operation completed successfully, or that an erroroccurred. After a transaction is completed, the bus returns to the busfree phase 815.

According to one aspect of the invention, a client server, in the roleof initiator, sends a SCSI command to a storage system, acting astarget, indicating that a snapshot should be performed. FIG. 8 showssystem 710 for generating a SCSI command, in accordance with thisimplementation. System 710 is a computer, e.g., a workstation or adesktop PC. Computer 710 includes a processor 730, memory 740 and clientserver 720. Computer 710 is connected to network 150 along path 745 (asshown in FIG. 1). Path 745 is a connector that allows computer 710 totransmit SCSI commands via network 150 to storage system 210 (as shownin FIG. 1).

Client server 720 executes on computer 710. Client server 720 is,typically, a software application that provides software services anddata to users. Referring to FIG. 1, client server 720 may be, forexample, file server 140-1, email server 140-2 or remote access server140-3.

In accordance with this implementation, client server 720 generates dataprocessing requests for storage system 210 in accordance with SCSIprotocols. Data processing requests are transmitted across network 150in accordance with IP or Fibre Channel protocols, to storage system 210.

FIG. 9 is a flowchart showing a method, in accordance with oneimplementation of the invention, for transmitting a command to a storagesystem indicating that a snapshot should be performed. At step 719,client server 720 determines that a snapshot is required. A variety ofdifferent conditions may prompt client server 720 to make thisdetermination. Client server 720 may, for example, determine that asnapshot of a mirroring disk should be generated before synchronizing amirroring disk with a primary disk. Alternatively, client server 720 maybe prompted by a human administrator to initiate a snapshot. In yetanother alternative, client server 720 may be a word processingapplication that automatically requests a snapshot under specifiedconditions.

At step 725, client server 720 initiates a SCSI transaction with storagesystem 210. Referring to FIG. 7, client server 720 arbitrates to use aSCSI bus in arbitration phase 820, and selects a target device inselection phase 825. In accordance with one implementation, clientserver 720 selects storage system manager 220 as the target.Alternatively, client server 720 may select a storage device as thetarget.

At step 732, client server 720 generates a SCSI command that representsa snapshot request. In accordance with this implementation, acustomer-defined SCSI command is utilized to indicate that a snapshot beperformed. Accordingly, client server 720 generates a command descriptorblock (CDB) of 6, 10 or 12 bytes in size.

At step 742, client server 720 transmits the SCSI command over network150 to storage system 210. Referring to FIG. 7, client server 720transmits the SCSI command to storage system 210 during the commandphase, which occurs during information transfer phases 840.

At step 750, storage system manager 220 receives the SCSI command andperforms the requested snapshot. According to one implementation,storage system manager 220 receives the SCSI command and transmits asnapshot marker to cache 340 as described above. The snapshot is takenonce the snapshot marker is flushed to disk.

In an alternative implementation, a storage system without a cache isemployed. Client server 720 transmits the SCSI command to the storagesystem, which performs a snapshot by an alternative method.

1. A method for recording data generated by a client server andtransmitted to a storage system, the method comprising: determining thata selected data processing operation is to be performed with respect todata stored in a storage system; determining that a record of at leastsome of the data stored in the storage system is required prior toperforming the selected data processing operation; generating a commandcomprising a request to generate a record of the data; and transmittingthe command to the storage system to generate the record; inserting,into a cache associated with the storage system, a data item indicatingthat a snapshot of the stored data is to be performed, after the commandis received; and performing a snapshot of the stored data after the dataitem is flushed from the cache.
 2. The method of claim 1, wherein thecommand is transmitted in accordance with SCSI protocols.
 3. The methodof claim 2, wherein the command comprises instructions contained in aSCSI command descriptor block.
 4. The method of claim 1, comprising:transmitting the command to the storage system via a network.
 5. Themethod of claim 4, wherein the network comprises a wide area network(WAN), a local area network (LAN), a Fibre-Channel-based storage areanetwork (SAN), an internet, or an intranet.
 6. The method of claim 1,comprising: transmitting the command periodically.
 7. The method ofclaim 1, comprising: transmitting the command aperiodically.
 8. Themethod of claim 7, further comprising: performing the selected dataprocessing operation, after the requested record of the stored data isgenerated.
 9. The method of claim 1, wherein performing the selecteddata processing operation comprises: synchronizing two storage systems.10. A method for recording data generated by a client server andtransmitted to a storage system, the method comprising: generating aSCSI command comprising a request to generate a snapshot of data storedin a storage system; and transmitting the SCSI command to the storagesystem; inserting, into a cache associated with the storage system, adata item indicating that a snapshot of the stored data is to beperformed, after the SCSI command is received by the storage system; andperforming a snapshot of the stored data after the data item is flushedfrom the cache.
 11. The method of claim 10, wherein the SCSI command istransmitted in accordance with SCSI protocols.
 12. The method of claim11, wherein the SCSI command comprises instructions contained in a SCSIcommand descriptor block.
 13. The method of claim 10, comprising:transmitting the SCSI command via a network.
 14. The method of claim 13,wherein the network comprises a WAN, a LAN, a Fibre-Channel-based SAN,an internet, or an intranet.
 15. The method of claim 10, comprising:transmitting the SCSI command periodically.
 16. The method of claim 10,comprising: transmitting the SCSI command aperiodically.
 17. The methodof claim 10, further comprising: conducting a selected data processingoperation with respect to at least some of the data stored in thestorage system; wherein the SCSI command is transmitted to the storagesystem prior to performance of the selected data processing operation.18. The method of claim 17, wherein conducting the data processingoperation comprises: synchronizing two storage systems.
 19. A system forrecording data generated by a client server and transmitted to a storagesystem, comprising: a storage system configured to: store data; and atleast one processor located remotely from the storage system and linkedto the storage system via a network, the at least one processor beingconfigured to: determine that a selected data processing operation is tobe performed with respect to data stored in the storage system;determine that a record of at least some of the data stored in thestorage system is required prior to performing the selected dataprocessing operation; generate a SCSI command comprising a request togenerate a record of the at least some of the stored data; and transmitthe command to the storage system to generate the record, via thenetwork in accordance with Internet Protocol (IP).
 20. The system ofclaim 19, wherein the command comprises instructions contained in a SCSIcommand descriptor block.
 21. The system of claim 19, wherein thenetwork comprises a WAN, a LAN, a Fibre-Channel-based SAN, an internet,or an intranet.
 22. The system of claim 19, wherein the at least oneprocessor is configured to: transmit the command to the storage systemperiodically.
 23. The system of claim 19, wherein the at least oneprocessor is configured to: transmit the command to the storage systemaperiodically.
 24. The system of claim 19, wherein the at least oneprocessor is further configured to: perform the selected data processingoperation, after the requested record of the stored data is generated.25. The system of claim 24, wherein the selected data processingoperation comprises synchrornzing two storage systems.
 26. A system forrecording data stored in a storage system, comprising: a storage systemconfigured to: store data; and at least one processor configured to:generate a SCSI command comprising a request to generate a snapshot ofdata stored in the storage system; and transmit the SCSI command to thestorage system; wherein the storage system is further configured to:insert, into a cache associated with the storage system, a data itemindicating that a snapshot of the stored data is to be performed, afterthe SCSI command is received by the storage system; and performing asnapshot of the stored data after the data item is flushed from thecache.
 27. The system of claim 26, wherein the SCSI command istransmitted in accordance with SCSI protocols.
 28. The system of claim27, wherein the SCSI command comprises instructions contained in a SCSIcommand descriptor block.
 29. The system of claim 26, wherein the atleast one processor is configured to: transmit the SCSI command to thestorage system via a network.
 30. The system of claim 29, wherein thenetwork comprises a WAN, a LAN, a Fibre-Channel-based SAN, an internet,or an intranet.
 31. The system of claim 26, wherein the at least oneprocessor is configured to: transmit the SCSI command to the storagesystem periodically.
 32. The system of claim 26, wherein the at leastone processor is configured to: transmit the command to the storagesystem aperiodically.
 33. The system of claim 26, wherein the at leastone processor is further configured to: conduct a selected dataprocessing operation with respect to at least some of the data stored inthe storage system; wherein the SCSI command is transmitted to thestorage system prior to performance of the requested selected dataprocessing operation.
 34. The system of claim 33, wherein the selecteddata processing operation comprises synchronizing two storage systems.35. A method for generating a snapshot of data stored in a storagesystem, comprising: receiving, by a storage system, a command comprisinga request to generate a snapshot of data stored in the storage system;inserting, into a cache associated with the storage system, a data itemindicating that a snapshot of the stored data is to be performed, afterthe command is received; and generating a snapshot of the stored data,after the data item is flushed from the cache.
 36. The method of claim35, further comprising: generating a snapshot of the stored data, inresponse to the command.
 37. The method of claim 36, wherein: thecommand comprises a SCSI command.